package com.aries.ui.widget.demo.module.alert;

import com.aries.ui.widget.alert.UIAlertDialog;
import ohos.agp.components.DirectionalLayout;
import ohos.agp.utils.Color;
import ohos.agp.utils.LayoutAlignment;
import ohos.agp.window.dialog.DisplayDialog;
import ohos.app.Context;

public class AlertDialogFragment extends DisplayDialog {
    public AlertDialogFragment(Context context) {
        super(context);
        UIAlertDialog dialog = new UIAlertDialog.DividerQQBuilder(context)
                .setTitle("退出群聊")
                .setTitleTextColor(Color.BLACK)
                .setMessage("你将退出  四川移动爱分享抢流量(XXXXXXXX) 退群通知仅群管理员可见。")
                .setMessageTextColor(Color.BLACK)
                .setNegativeButton("取消", null)
                .setNegativeButtonTextColor(Color.BLACK)
                .setPositiveButton("退出", null)
                .setPositiveButtonTextColor(Color.BLACK)
                .setNeutralButton("中性", null)
                .setNeutralButtonTextColor(Color.BLACK)
                .create();
//        dialog.show();
        dialog.setAlignment(LayoutAlignment.CENTER);
        this.setContentComponent((DirectionalLayout) dialog.getContentView());
        this.setTransparent(true);
        this.setAlignment(LayoutAlignment.CENTER);
    }
}
